import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
    {
        path: '/',
        name: 'home',
        component:()=>import('../views/Route.vue'),
        children: [
            {
                path: '/discover',
                name: 'discover',
                component:()=>import('@/views/discover/index.vue'),
            },{
                path: '/video',
                name: 'video',
                component:()=>import('@/views/video/index.vue'),
            },{
                path: '/radio',
                name: 'radio',
                component:()=>import('@/views/radio/index.vue'),
            },{
                path: '/login',
                name: 'login',
                component:()=>import('@/views/login/login.vue'),
            },
        ]
    }
]

// 这里写完了路由以后,要把这个 导出出去
export const router = createRouter({
    history:createWebHashHistory(),
    linkActiveClass: 'active',// 默认路由跳转
    routes
})
